package one;

import org.junit.Test;

import java.util.*;

/**
 * 项目名称：Demo01
 * 类 名 称：javaContianer
 * 类 描 述：TODO
 * 创建时间：2021/03/09 10:43
 * 创 建 人：XiaoCoder
 */
public class javaContainer {
    @Test
    public void demo01() {
        ArrayList<Integer> ary = new ArrayList<Integer>();
        ary.add(1);
        ary.add(2);
        ary.add(3);
        ary.add(4);
        Iterator<Integer> iterator = ary.iterator();
        while (iterator.hasNext()) {
            Integer next = iterator.next();
            System.out.println(next);
            iterator.remove();
        }
        System.out.println("打印完成！");
        System.out.println(ary);
    }

    @Test
    public void demo02() {
        //Vector<Integer> v = new Vector<>();
        //Hashtable<Integer, Object> table = new Hashtable<>();
        HashMap<Integer,Object> map = new HashMap<>();
    }
}
